﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EC.Application.Interface
{
    using EC.Entity;
    using EC.Entity.Query;
    using EC.Entity.Request.Business;
    using EC.Entity.Request.Merchant;
    using EC.Entity.Request.Token;
    using EC.Entity.Response.Merchant;
    using EC.Entity.Response.Token;

    /// <summary>
    /// 
    /// </summary>
    public interface MerchantService
    {
        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        MerchantResponse Get(int id);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        List<MerchantResponse> GetList(int type);

        /// <summary>
        /// 根据商户ID获取Token
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        List<MerchantResponse> GetType(int type);

        /// <summary>
        /// 根据商户ID获取Token
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        List<MerchantResponse> GetMerchantByIds(List<int> ids);

        /// <summary>
        /// 根据商户ID获取Token
        /// </summary>
        /// <param name="merchantId">编号</param>
        /// <returns></returns>
        TokenResponse GetToken(int merchantId);

        /// <summary>
        /// 设置代理
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveProxy(SaveProxyRequest request);

        /// <summary>
        /// Token新增、编辑
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveToken(SaveTokenRequest request);

        /// <summary>
        /// 新增、编辑
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult Save(SaveMerchantRequest request);

        /// <summary>
        /// 新增、编辑
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveFinance(SaveMerchantRequest request);

        /// <summary>
        /// 充值
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveRecharge(BalanceRequest request);

        /// <summary>
        /// 充值(带手续费)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveRechargeFee(BalanceRequest request);

        /// <summary>
        /// 扣减余额
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveLessBalance(BalanceRequest request);

        /// <summary>
        /// 余额冻结
        /// </summary>
        /// <returns></returns>
        JResult SaveFrozenBalance(BalanceRequest request);


        /// <summary>
        /// 提现
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveWithdrawal(SaveWithdrawalRequest request);

        /// <summary>
        /// 解冻
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult Thaw(ThawRequest request);

        /// <summary>
        /// 状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        JResult UpdateStatus(int id, sbyte status);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedList<MerchantQueryResponse> GetPager(MerchantQuery query);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedList<MerchantQueryResponse> GetSyPager(MerchantQuery query);
    }
}
